From: Keir Fraser Date: Mon, 27 Apr 2009 14:40:09 +0000 (+0100) Subject: x86 hvm: During task switch, LDT must be loaded before all other X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13948 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=1908c5cf4384f670c94a6e448162f2dc3e8d0a9f;p=xen.git x86 hvm: During task switch, LDT must be loaded before all other segments, as some may be loaded from the LDT. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 82b99ab761..a2c23e09f1 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -1440,13 +1440,13 @@ void hvm_task_switch( } exn_raised = 0; - if ( hvm_load_segment_selector(v, x86_seg_es, tss.es) || + if ( hvm_load_segment_selector(v, x86_seg_ldtr, tss.ldt) || + hvm_load_segment_selector(v, x86_seg_es, tss.es) || hvm_load_segment_selector(v, x86_seg_cs, tss.cs) || hvm_load_segment_selector(v, x86_seg_ss, tss.ss) || hvm_load_segment_selector(v, x86_seg_ds, tss.ds) || hvm_load_segment_selector(v, x86_seg_fs, tss.fs) || - hvm_load_segment_selector(v, x86_seg_gs, tss.gs) || - hvm_load_segment_selector(v, x86_seg_ldtr, tss.ldt) ) + hvm_load_segment_selector(v, x86_seg_gs, tss.gs) ) exn_raised = 1; rc = hvm_copy_to_guest_virt(